typedef float REALN;
typedef unsigned int UINTN;

#define CORRECTED_NEGATIVE_VARIANCE 0.0

#define MAX_GRID_DIM 65535

#define REDUCE_BS1C 128
#define REDUCE_BS2C 128
#define POW2_BS 128
#define MULT_BS 128
#define VAR_BS 128
#define R_BS 128

#define INPUT_PADDING 128
#define AVAILABLE_GPU_MEM 400000000
#define AVAILABLE_CPU_MEM 1000000000

#define MEMORY DEVICE_MEM
